/**
 * 身份验证令牌
 *
 *  *  */
export class AuthenticationTokens {
  /**
   * 访问令牌
   */
  public access_token: string
  /**
   * 刷新令牌
   */
  public refresh_token: string
  /**
   * 刷新令牌过期时间的时间戳
   */
  public refresh_token_expire_in: number

  public static isExpired(refresh_token_expire_in: number | null | undefined): boolean {
    if (refresh_token_expire_in == null) return true
    return refresh_token_expire_in < Date.now()
  }
}

/**
 * 用户信息vo
 *
 *  *  */
export class UserInfo {
  public id: number
  public username: string
  public nickname: string
  public phone: string
  public email: string
  public sex: number
  public avatar: string
  public openid: string
  public platform: number
  public createTime: Date
  public updateTime: Date
}
